using System.Windows;
using RobotPratolSolution.ViewModels;

namespace RobotPratolSolution.Pages
{
    public partial class EditRobotDialog : Window
    {
        public EditRobotDialog()
        {
            InitializeComponent();
        }

        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            var vm = DataContext as SysSettingViewModel;
            if (vm?.SelectedRobot != null)
            {
                DialogResult = true;
            }
            this.Close();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            this.Close();
        }
    }
}